package com.ljj.util;

public class FileStringUtil {

    /**
     * 获取新文件名称
     * @param oldFileName
     * @param newSuffixName
     * @return
     */
    public static String getNewFileName(String oldFileName,String newSuffixName){
        //获取文件后缀名
        String suffixName = oldFileName.substring(oldFileName.lastIndexOf(".")+1,oldFileName.length());
        //获取新文件名
        String newFileName = oldFileName.replace(suffixName,newSuffixName);
        return newFileName;
    }

}
